package cn.emall.controller;

import cn.emall.search.service.SearchItemService;
import cn.emall.utils.EmallResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SearchItemController {

    @Autowired
    private SearchItemService searchItemService;

    @RequestMapping("/index/item/import")
    @ResponseBody
    public EmallResult importItemList(){
        EmallResult emallResult = searchItemService.importAllItems();
        return emallResult;
    }
}
